package com.example.service;

import com.alibaba.trade.param.AlibabaAscpTradeModelTradeInfo;
import com.alibaba.trade.param.AlibabaAscpTradeSellerViewGetListResult;
import com.example.shiti.TradeInfo;
import java.util.List;

public class SaveAllOrder {
    public void SaveOrder(AlibabaAscpTradeSellerViewGetListResult result) {
        List<AlibabaAscpTradeModelTradeInfo>  TradeInfo = List.of(result.getResult());
        for (AlibabaAscpTradeModelTradeInfo info:TradeInfo){
            TradeInfoRepository save = new TradeInfoRepository();
            save.saveTradeInfo(TradeInfoConverter.convert(info));
        }
    }
}
